﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="UCChiNhanh.ascx.cs" Inherits="Admin_UCControls_UCChiNhanh" %>

<table width="100%">
   
    <tr>
      <td style="height:30px"><strong>Tỉnh thành </strong>&nbsp;&nbsp;
          <asp:DropDownList ID="ddlTinhThanh" runat="server">
          </asp:DropDownList>
          &nbsp;<strong>Chi nhánh</strong>&nbsp;&nbsp;<asp:TextBox ID="txtTenChiNhanh" runat="server"></asp:TextBox>&nbsp;&nbsp;
          <asp:Button ID="btnTim" runat="server" Text="Tìm" OnClick="btnTim_Click" /></td>
    </tr>
    <tr>
        <td>
            <asp:GridView Width="100%" ID="GridChiNhanh" runat="server" AllowPaging="True" PageIndex="20" AutoGenerateColumns="False" DataKeyNames="ID" 
                          OnRowCommand="GridChiNhanh_RowCommand" OnPageIndexChanging="GridChiNhanh_PageIndexChanging" 
                          CssClass="mGrid"  
                          PagerStyle-CssClass="pgr" EmptyDataText="Chưa có dữ liệu chi nhánh" EmptyDataRowStyle-ForeColor="Blue" 
                          AlternatingRowStyle-CssClass="alt">
              <Columns>
                    <asp:TemplateField HeaderText="STT">
                    <ItemTemplate>
                         <%# Container.DataItemIndex + 1 %>  
                    </ItemTemplate>
                    </asp:TemplateField>
              
                   <asp:TemplateField HeaderText="Chi Nh&#225;nh" ItemStyle-Width="100px">
                    <ItemTemplate>
                        <%# Eval("Ten") %>
                    </ItemTemplate>
                    </asp:TemplateField>
                    
                    <asp:TemplateField HeaderText="Địa chỉ" ItemStyle-Width="200px">
                    <ItemTemplate>
                        <%# Eval("DiaChi") %>
                    </ItemTemplate>
                    </asp:TemplateField>
                    
                    <asp:TemplateField HeaderText="Số điện thoại" ItemStyle-Width="100px">
                    <ItemTemplate>
                        <%# Eval("SoDienThoai") %>
                    </ItemTemplate>
                    </asp:TemplateField>
                   <asp:TemplateField><ItemTemplate>
                        <asp:LinkButton ID="btnSua" runat="server" Text="Sửa"  CommandName="Sua" CommandArgument='<%#Bind("Id")%>' />
                         &nbsp;<asp:LinkButton ID="btnXoa" runat="server" Text="Xóa" CommandName="Xoa" CommandArgument='<%#Bind("Id")%>' OnClientClick="javascript:return confirm('Có chắc xóa Chi Nhánh này không?');"/>
                  </ItemTemplate>
                    </asp:TemplateField>
                   
                    </Columns>
                     <%-- <HeaderStyle Height="27px" BackColor="#0066cc" Font-Bold="true" ForeColor="white" />    
             --%>
            </asp:GridView>
        </td>
    </tr>
    <tr>
    <td style="padding-top:5px">
        <asp:Button ID="btnThemMoi" runat="server" Text="Thêm mới" OnClick="btnThemMoi_Click" /></td>
    </tr>
</table>